﻿<%@ Page Title="" Language="C#" MasterPageFile="~/NestedMasterPage.master" AutoEventWireup="true" CodeBehind="WebUserInfo.aspx.cs" Inherits="Web.WebUserInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <p style="padding:10px 0px 10px 0px;">
         <asp:SiteMapPath ID="SiteMapPath1" runat="server" CssClass="sitmap"
        Style="font-family: 幼圆; font-size: medium" Font-Names="Verdana" Font-Size="0.8em"  PathSeparator=" > ">
        <PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />
        <CurrentNodeStyle ForeColor="#333333" />
        <NodeStyle Font-Bold="True" />
        <RootNodeStyle Font-Bold="True"  />
    </asp:SiteMapPath>
    </p>
    <link href="css/bootstrap.min.css" rel="stylesheet"  />
    <div class="panel panel-default">
        <div class="panel-body">
            <form role="form" id="frm"  enctype="multipart/form-data" >
                <input type="hidden" class="form-control" id="account" name="account" value="<%=model.account %>">
                <input type="hidden" class="form-control" id="password" name="password" value="<%=model.password %>">
                <input type="hidden" class="form-control" id="Id" name="Id" value="<%=model.Id %>">
                <input type="hidden" class="form-control" id="roleid" name="roleid" value="<%=model.roleid %>">
      
                <input type="hidden" class="form-control" id="user_number" name="user_number" value="<%=model.user_number %>">
                
                    <div class="col-sm-4">
                        <img src="<%=model.head_img %>" id="P_Img" class="img-thumbnail" />
                    </div>
                <div class="col-sm-8">

                    <div class="form-group">
                        <label for="fileUp">图片</label>



                        <input type="file" id="fileUp" name="fileUp" class="form-control">
                    </div>

                    <div class="form-group">
                        <label for="name">姓名</label>
                        <input type="text" class="form-control" id="name" name="name" value="<%=model.name %>" placeholder="请输入姓名">
                    </div>
                    <div class="form-group">
                        <label for="Address">地址</label>
                        <input type="text" class="form-control" id="Address" name="Address" value="<%=model.Address %>" placeholder="请输入地址">
                    </div>
                    <div class="form-group">
                        <label for="Tel">联系电话</label>
                        <input type="text" class="form-control" id="Tel" name="Tel" value="<%=model.Tel %>" placeholder="请输入联系电话">
                    </div>
                    <div class="form-group">
                        <label for="brothday">生日</label>
                        <input type="text" class="form-control" id="brothday" name="brothday" value="<%=model.brothday.ToString("yyyy-MM-dd") %>" placeholder="请输入生日">
                    </div>
                </div>
      
                <button type="submit" class="btn btn-default">提交</button>
            </form>
        </div>
    </div>
     <script src="js/jquery.form.js"></script>
    <script>
        $("#fileUp").change(function () {
            $("#P_Img").attr("src", URL.createObjectURL($(this)[0].files[0]));
        });
    </script>
     <script>
         var options = {
             target: '#frm',
             success: suncess,
             url: "../Hanlder/UserHanlder.ashx?Method=Edit",
             type: "post",
             dataType: "json",
             timeout: 3000
         }
         $("#frm").ajaxForm(options);
         function suncess(data) {
             var res = data;

             if (res.states == "1") {
                 alert(res.msg);
             }
             else {
                 alert('修改成功');
                 location.reload();
             }
         }
    </script>
</asp:Content>
